Defines polynomial assignment.
Assigns the contents of one polynomial to another.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polynomial), | intent(inout) | :: | x |
The assignee. |
||
| class(polynomial), | intent(in) | :: | y |
The item to copy. |
Assigns a number to each coefficient of the polynomial.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polynomial), | intent(inout) | :: | x |
The assignee. |
||
| real(kind=real64), | intent(in) | :: | y |
The value to assign. |
Assigns the contents of an array as polynomial coefficients.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polynomial), | intent(inout) | :: | x |
The assignee. |
||
| real(kind=real64), | intent(in), | dimension(:) | :: | y |
The coefficient array. |
Defines polynomial multiplication
Multiplies two polynomials.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polynomial), | intent(in) | :: | x |
The left-hand-side argument. |
||
| class(polynomial), | intent(in) | :: | y |
The right-hand-side argument. |
The resulting polynomial.
Multiplies a polynomial by a scalar value.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polynomial), | intent(in) | :: | x |
The left-hand-side argument. |
||
| real(kind=real64), | intent(in) | :: | y |
The right-hand-side argument. |
The resulting polynomial.
Multiplies a polynomial by a scalar value.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | x |
The left-hand-side argument. |
||
| class(polynomial), | intent(in) | :: | y |
The right-hand-side argument. |
The resulting polynomial.
Defines polynomial addition.
Adds two polynomials.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polynomial), | intent(in) | :: | x |
The left-hand-side argument. |
||
| class(polynomial), | intent(in) | :: | y |
The right-hand-side argument. |
The resulting polynomial.
Defines polynomial subtraction.
Subtracts two polynomials.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(polynomial), | intent(in) | :: | x |
The left-hand-side argument. |
||
| class(polynomial), | intent(in) | :: | y |
The right-hand-side argument. |
The resulting polynomial.
Initializes a new polynomial instance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | order |
The order of the polynomial (must be >= 0). |
The new polynomial object.
Initializes a new polynomial instance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in), | dimension(:) | :: | c |
The array of polynomial coefficients. The coefficients are established as follows: c(1) + c(2) * x + c(3) * x2 + ... c(n) * xn-1. |
The new polynomial object.
Defines a polynomial, and associated routines for performing polynomial operations.
| private function poly_init_1 (order) | Initializes a new polynomial instance. |
| private function poly_init_2 (c) | Initializes a new polynomial instance. |
| procedure, public :: companion_mtx => poly_companion_mtx | |
| procedure, public :: divide => poly_divide | |
| generic, public :: evaluate => evaluate_real, evaluate_complex | |
| procedure, public :: fit => poly_fit | |
| procedure, public :: fit_thru_zero => poly_fit_thru_zero | |
| procedure, public :: get => get_poly_coefficient | |
| procedure, public :: get_all => get_poly_coefficients | |
| generic, public :: initialize => init_poly, init_poly_coeffs | |
| procedure, public :: order => get_poly_order | |
| procedure, public :: roots => poly_roots | |
| procedure, public :: set => set_poly_coefficient |